Skip to content

Conversation

@dscho
Copy link
Member

@dscho dscho commented Jul 1, 2025

In the Git for Windows project, we want to be notified of new cURL versions, but not of the rc- versions. We did add a pattern to filter them out, but obviously this did not work because git-for-windows/git#5701 was opened anyway.

The culprit is a long-standing bug: the title-pattern is applied after the prefix is prefixed (if any).

Let's fix that, and add a test to document the intended behavior.

@dscho dscho requested a review from rimrul July 1, 2025 18:53
@dscho dscho self-assigned this Jul 1, 2025
@dscho dscho force-pushed the fix-curl-rc-version-exclusion branch from c61adc8 to dcb0fea Compare July 1, 2025 18:57
@dscho dscho force-pushed the fix-curl-rc-version-exclusion branch from dcb0fea to 0396988 Compare July 5, 2025 22:08
@dscho
Copy link
Member Author

dscho commented Jul 5, 2025

git range-diff $PREVIOUS_VERSION... -- ':(exclude)dist/'
  • 1: 9a96cca ! 1: 129d962 title-pattern: match without prefix, if any

    @@ Commit message
         candidate versions via a title-pattern. However, we also specify a
         prefix and that pattern was applied _after_ prefixing the title.
     
    -    Not what we want. Really only match the original feed's title (or the
    -    publication date as fallback if the feed item lacks a title).
    +    Not what we want. Really only match the original feed's title.
     
         Signed-off-by: Johannes Schindelin <[email protected]>
     
    @@ index.js: const run = async () => {
     -      const title = `${issueTitlePrefix}${item.title || (item.pubDate && new Date(item.pubDate).toUTCString())}`
     -      if (titlePattern && !title.match(titlePattern)) {
     -        core.debug(`Feed item skipped because it does not match the title pattern (${title})`)
    -+      if (!item.title && item.pubDate) item.title = new Date(item.pubDate).toUTCString()
    -+      if (!item.title) {
    ++      if (!item.title && (titlePattern || !item.pubDate)) {
     +        core.debug(`Feed item ${JSON.stringify(item)} skipped because it has no title`)
              continue
            }
    @@ index.js: const run = async () => {
     +        core.debug(`Feed item skipped because it does not match the title pattern (${item.title})`)
     +        continue
     +      }
    -+      const title = `${issueTitlePrefix}${item.title}`
    ++      const title = `${issueTitlePrefix}${item.title || new Date(item.pubDate).toUTCString()}`
      
            core.debug(`Issue '${title}'`)
      
  • 2: dcb0fea = 2: 0396988 test: verify that cURL's rc-* versions can be filtered out

dscho added 3 commits July 9, 2025 10:36
In the Git for Windows project, we tried to filter out cURL's release
candidate versions via a title-pattern. However, we also specify a
prefix and that pattern was applied _after_ prefixing the title.

Not what we want. Really only match the original feed's title.

Signed-off-by: Johannes Schindelin <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho force-pushed the fix-curl-rc-version-exclusion branch from 0396988 to aa4678a Compare July 9, 2025 08:43
@dscho dscho merged commit a4da07a into git-for-windows:main Jul 9, 2025
1 check passed
@dscho dscho deleted the fix-curl-rc-version-exclusion branch July 9, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants